package com.yingsheng.bi.hks.feign.client;

import com.yingsheng.bi.hks.basic.FeignConst;
import com.yingsheng.bi.hks.comm.WxPayMpCreateOrderReq;
import com.yingsheng.bi.hks.comm.WxPayMpCreateOrderRes;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;

@Api(tags = "支付模块")
@FeignClient(contextId = FeignConst.HKS_PAYMENT, name = FeignConst.SERVICE_NAME)
public interface PaymentFeignClient {

    @ApiOperation(httpMethod = "POST", value = "创建订单")
    @PostMapping(value = "/wxPay/mpOrderCreate")
    WxPayMpCreateOrderRes createOrder(@RequestBody WxPayMpCreateOrderReq req);

    @ApiOperation(httpMethod = "POST", value = "订单通知")
    @PostMapping(value = "/wxPay/mqOrderNotice")
    String mqOrderNotice(HttpServletRequest request);
}
